package com.yuncheng.spcyApi.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuncheng.spcyApi.entity.SpcySqsxJob;
import com.yuncheng.spcyApi.entity.SpcyZltxwjFlow;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yuncheng.vo.CurrentUserVo;
import com.yuncheng.spcyApi.vo.common.OrderItemVo;
import com.yuncheng.spcyApi.vo.flow.ZltxwjFlowListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 审评查验-质量体系文件-流程记录
 * @Author: yuncheng
 * @Date: 2023-07-04
 * @Version: V1.0
 */
public interface SpcyZltxwjFlowMapper extends BaseMapper<SpcyZltxwjFlow> {
    Page<ZltxwjFlowListVo> flowJkPage(Page<ZltxwjFlowListVo> page,
                                      @Param("onlyCurrentUser") boolean onlyCurrentUser,
                                      @Param("user") CurrentUserVo user,
                                      @Param("spcyFlowVo") ZltxwjFlowListVo spcyFlowVo);

    Page<ZltxwjFlowListVo> myYbFlowPage(Page<ZltxwjFlowListVo> page,
                                      @Param("onlyCurrentUser") boolean onlyCurrentUser,
                                      @Param("user") CurrentUserVo user,
                                      @Param("spcyFlowVo") ZltxwjFlowListVo spcyFlowVo);

    /** 质量体系文件-我的待办 */
    Page<ZltxwjFlowListVo> selectFlowJobPage(Page<ZltxwjFlowListVo> page,
                                        @Param("userid") String userid,
                                        @Param("flowVo") ZltxwjFlowListVo flowVo,
                                        @Param("orderBean") OrderItemVo orderItemVo);

    /** 质量体系文件-我的已办 */
    Page<ZltxwjFlowListVo> selectYbFlowJobPage(Page<ZltxwjFlowListVo> page,
                                          @Param("userid") String userid,
                                          @Param("flowVo") ZltxwjFlowListVo flowVo,
                                          @Param("orderBean") OrderItemVo orderItemVo);
    /** 查询宣贯学习人员列表 */
    List<SpcySqsxJob> selectXgxxJobList(@Param("pid") String pid, @Param("fhjmc") String fhjmc);

    /** 查询流程名称-根据业务id */
    List<String> selectFhjmcListByFpid(@Param("pid") String pid);

    /** 查询宣贯学习人员id-根据id */
    String selectFxgxxryidById(@Param("id") String id);

    /** 查询流程任务环节-根据id */
    SpcySqsxJob selectJobJbxxById(@Param("id") String id);

}
